#pragma once
#include <iostream>

#include <unistd.h>

#include "Log.hpp"

const static int time_wait = 1;
class Time
{   
public:
    Time()
        :_log(Log())
        , _time(time_wait)
    {}
    ~Time()
    {}
    void Running()
    {
        int times = 1;
        while(true)
        {
            sleep(_time);
            int level = rand() % 4;    
            _log.LogMessage(OneFile, level, "Timer tick %d\n", times++);
        }
    }
private:
    Log _log;
    int _time;
};